Engine knocking is a phenomenon that may occur in an internal-combustion engine using spark plugs. The spark plug produces a voltage across a gap, causing a fuel-air mixture in a cylinder of the engine to combust. The timing of the ignition of the spark plug is set to a particular point in a cycle of a piston moving within the cylinder. Engine knocking is ignition of the fuel-air mixture prematurely relative to the cycle and/or ignition outside of the gap of the spark plug. Engine knocking may be caused by abnormally hot regions of the piston and/or cylinder, by fuel deposits that have built up in the engine over time, and/or by other causes. The detonations that occur during engine knocking may be audible to occupants of the vehicle or may be below the range of human hearing. Engine knocking can decrease the fuel economy of the vehicle, increase environmentally harmful emissions, annoy or concern occupants of the vehicle, and/or deteriorate the engine. There is an opportunity to provide improved vehicle engine control to reduce and/or minimize engine knocking.